package com.weizhi.business.config;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@MapperScan("com.weizhi.server.mapper")
@ComponentScan("com.weizhi")
@EnableTransactionManagement
public class BusinessApplication {

        private final static Logger logger = LoggerFactory.getLogger(BusinessApplication.class);

        public static void main(String[] args) {
            ConfigurableApplicationContext run = SpringApplication.run(BusinessApplication.class, args);
            ConfigurableEnvironment env = run.getEnvironment();
            logger.info("business项目启动, http://127.0.0.1:{}", env.getProperty("server.port"));
        }
}
